Class java.awt.image.ColorModel
All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.image.ColorModel
Object
|
+----java.awt.image.ColorModel
- public abstract class ColorModel
- extends Object
A class that encapsulates the methods for translating from pixel values
to alpha, red, green, and blue color components for an image. This
class is abstract.
- Version:
- 1.13 07/01/98
- Author:
- Jim Graham
- See Also:
- IndexColorModel, DirectColorModel
-
pixel_bits
-
-
java.awt.image.ColorModel(int)
- Constructs a ColorModel which describes a pixel of the specified
number of bits.
-
finalize()
- Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
-
getAlpha(int)
- The subclass must provide a function which provides the alpha
color compoment for the specified pixel.
-
getBlue(int)
- The subclass must provide a function which provides the blue
color compoment for the specified pixel.
-
getGreen(int)
- The subclass must provide a function which provides the green
color compoment for the specified pixel.
-
getPixelSize()
- Returns the number of bits per pixel described by this ColorModel.
-
getRGB(int)
- Returns the color of the pixel in the default RGB color model.
-
getRGBdefault()
- Return a ColorModel which describes the default format for
integer RGB values used throughout the AWT image interfaces.
-
getRed(int)
- The subclass must provide a function which provides the red
color compoment for the specified pixel.
pixel_bits
protected int pixel_bits
ColorModel
public ColorModel(int bits)
- Constructs a ColorModel which describes a pixel of the specified
number of bits.
finalize
public void finalize()
- Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
- Overrides:
- finalize in class Object
getAlpha
public abstract int getAlpha(int pixel)
- The subclass must provide a function which provides the alpha
color compoment for the specified pixel.
- Returns:
- The alpha transparency value ranging from 0 to 255
getBlue
public abstract int getBlue(int pixel)
- The subclass must provide a function which provides the blue
color compoment for the specified pixel.
- Returns:
- The blue color component ranging from 0 to 255
getGreen
public abstract int getGreen(int pixel)
- The subclass must provide a function which provides the green
color compoment for the specified pixel.
- Returns:
- The green color component ranging from 0 to 255
getPixelSize
public int getPixelSize()
- Returns the number of bits per pixel described by this ColorModel.
getRGB
public int getRGB(int pixel)
- Returns the color of the pixel in the default RGB color model.
- See Also:
- getRGBdefault
getRGBdefault
public static java.awt.image.ColorModel getRGBdefault()
- Return a ColorModel which describes the default format for
integer RGB values used throughout the AWT image interfaces.
The format for the RGB values is an integer with 8 bits
each of alpha, red, green, and blue color components ordered
correspondingly from the most significant byte to the least
significant byte, as in: 0xAARRGGBB
getRed
public abstract int getRed(int pixel)
- The subclass must provide a function which provides the red
color compoment for the specified pixel.
- Returns:
- The red color component ranging from 0 to 255
All Packages Class Hierarchy This Package Previous Next Index